package com.DHH.Entity.Capital;
import com.DHH.Entity.Base.BaseUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 实体类CapitalSurplusMoneyRecord
 * 数据表capital_tb_surplus_money_record
 * 用户余额操作记录表
 * 2017-8-3 12:33:07
 * @author Administrator
 *
 */
@Table(name = "capital_tb_surplus_money_record")
public class CapitalSurplusMoneyRecord  implements Serializable {

	//
	private Integer id;
	//
	@NotNull(message = "不能为空")
	private Integer userId;
	//操作消息
	@NotNull(message = "操作消息不能为空")
	@Length(max = 32, min = 0, message = "操作消息长度为0-32个字符")
	private String msg;
	//操作时间
	@NotNull(message = "操作时间不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8:00" )
	private Date createTime;
	//状态编号
	@NotNull(message = "状态编号不能为空")
	private Integer stateId;
	//订单号码
	@NotNull(message = "订单号码不能为空")
	@Length(max = 64, min = 0, message = "订单号码长度为0-64个字符")
	private String payId;

	private Float surplus;
	private Float operateMoney;
	@Transient
	private BaseUser baseUser;
	@Transient
	private CapitalSurplusMoneyState capitalSurplusMoneyState;
	public CapitalSurplusMoneyRecord(){

	}

	public void setId(Integer id){
		this.id=id;
	}

	public Integer getId(){
		return this.id;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}

	public Integer getUserId(){
		return this.userId;
	}
	public void setMsg(String msg){
		this.msg=msg;
	}

	public String getMsg(){
		return this.msg;
	}
	public void setCreateTime(Date createTime){
		this.createTime=createTime;
	}

	public Date getCreateTime(){
		return this.createTime;
	}
	public void setStateId(Integer stateId){
		this.stateId=stateId;
	}

	public Integer getStateId(){
		return this.stateId;
	}
	public void setPayId(String payId){
		this.payId=payId;
	}

	public String getPayId(){
		return this.payId;
	}

	public Float getSurplus() {
		return surplus;
	}

	public void setSurplus(Float surplus) {
		this.surplus = surplus;
	}

	public Float getOperateMoney() {
		return operateMoney;
	}

	public void setOperateMoney(Float operateMoney) {
		this.operateMoney = operateMoney;
	}

	public BaseUser getBaseUser() {
		return baseUser;
	}

	public void setBaseUser(BaseUser baseUser) {
		this.baseUser = baseUser;
	}

	public CapitalSurplusMoneyState getCapitalSurplusMoneyState() {
		return capitalSurplusMoneyState;
	}

	public void setCapitalSurplusMoneyState(CapitalSurplusMoneyState capitalSurplusMoneyState) {
		this.capitalSurplusMoneyState = capitalSurplusMoneyState;
	}

	@Override
	public String toString() {
		return "CapitalSurplusMoneyRecord{" +
				"id=" + id +
				", userId=" + userId +
				", msg='" + msg + '\'' +
				", createTime=" + createTime +
				", stateId=" + stateId +
				", payId='" + payId + '\'' +
				", surplus=" + surplus +
				", operateMoney=" + operateMoney +
				", baseUser=" + baseUser +
				", capitalSurplusMoneyState=" + capitalSurplusMoneyState +
				'}';
	}
}
